package com.atguigu.inner.same;


public class CircleComparator implements MyComparator{
    @Override
    public int compare(Object o1, Object o2) {
       Circle c1 = (Circle) o1;
       Circle c2 = (Circle) o2;
        if(c1.getRadius() > c2.getRadius()){
            return 1;
        }else if(c1.getRadius() < c2.getRadius()){
            return -1;
        }else{
            return 0;
        }
    }
}
